package com.incito.crawl.common.utils.proxy;

/**
 * Created by IntelliJ IDEA.
 * User: YZC
 * Date: 12-11-8
 * Time: 下午1:30
 * To change this template use File | Settings | File Templates.
 */
public class ProxyInfo {
    private String ip;
    private int port;

    public int getPort() {
        return port;
    }

    public void setPort(int port) {
        this.port = port;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof ProxyInfo)) return false;

        ProxyInfo proxyInfo = (ProxyInfo) o;

        if (port != proxyInfo.port) return false;
        if (!ip.equals(proxyInfo.ip)) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = ip.hashCode();
        result = 31 * result + port;
        return result;
    }

    @Override
    public String toString() {
        return "ProxyInfo{" +
                "ip='" + ip + '\'' +
                ", port=" + port +
                '}';
    }
}
